abstract class Motor{
  abstract void brake();
}
interface MoneyFare{
   void charge ();
}
interface ControlT{
    void controlAT();
}
class Bus extends Motor implements MoneyFare{
  void brake(){
     System.out.println("公共汽车使用毂式刹车技术");
  }
  public void charge (){
      System.out.println("一元一张，不计公里");
  }
}
class Taxi extends Motor implements MoneyFare,ControlT{
    void brake(){
       System.out.println("出租车使用盘式刹车技术");
    }
    public void charge(){
       System.out.println("2元一公里，起价3公里");
    }
    public void controlAT(){
       System.out.println("出租车安装了HAri空调");
    }
}
class Cinema implements MoneyFare,ControlT{
    public void charge(){
       System.out.println("电影院门票十元一张");
    }
    public void controlAT(){
       System.out.println("电影院安装了中央空调");
    }
}
public class Example6_3{
      public static void main(String args[]){
         Bus bus101 = new Bus();
         Taxi buleTaxi = new Taxi ();
         Cinema redStarCinema = new Cinema ();
         MoneyFare fare;
         ControlT temperature;
         fare = bus101;
         fare.charge();
         bus101.brake();
         fare = buleTaxi;
         temperature = buleTaxi;
         buleTaxi.brake();
         fare.charge();
         temperature.controlAT();
         fare = redStarCinema;
         temperature = redStarCinema;
         fare.charge();
         temperature.controlAT();
      }
}

    





















   










  






